<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
           <input v-model.number="num1" type="number"> + 
           <input v-model.number="num2" type="number"> = 
           {{ num1 + num2 }}


           <hr>
           <!-- 去除首尾空格 -->
           <input type="text" v-model.trim="msg">

           <hr>
           <!-- 输入完了才把输入的内容给数据 -->
           <!-- 什么才叫输入完了？失去焦点或者按回车 -->
           <input type="text" v-model.lazy.trim="msg">
           <p>{{ msg }}</p>
      </div>
    <script src="./vue.js"></script>
    <script>
        new Vue({
            el: "#app",
            data() {
                return {
                   num1: 0,
                   num2: 0,
                   msg: ''
                }
            },
            methods:{
                   
            }
        })
    </script>
</body>
</html>